import { Entity, Column, PrimaryGeneratedColumn, CreateDateColumn } from 'typeorm';

@Entity()
export class videoBase {
  @PrimaryGeneratedColumn('uuid')
  video_id?: number;

  @Column()
  description: string;

  @Column()
  userName: string;

  @Column()
  label: 'shader'|'effect'|'game'|'model'|'home';

  @Column()
  name: string;

  @CreateDateColumn({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' })
  createTime: boolean;

  @Column()
  playVolume: number;    //播放量

  @Column()
  likes:number;

  @Column()
  url:string; 
}

@Entity()
export class commentsBase{
  @PrimaryGeneratedColumn('uuid')
  comment_id?:number;

  @Column()
  av_id:string;    //对应av号

  @Column()
  description:string;   //评论描述

  @Column()
  content:string;      //内容

  @CreateDateColumn({ type: 'timestamp', default: () => 'CURRENT_TIMESTAMP' })
  comment_date?:string;

  @Column()
  auth_name:string;   //作者名称

  @Column()
  auth_id:string;    //作者索引

  @Column()
  likes:number;    

  @Column({default:1})
  type:1 |2;    //1:主页评论    2:附加评论

  @Column()
  alt_id?:string  //1.回复的作者id

  @Column()
  alt_name?:string    //回复的作者名称
}